//
//  GXCircleImageViewAndLabel.m
//  IamgeViewAn
//
//  Created by 甘霞 on 15/10/22.
//  Copyright © 2015年 甘霞. All rights reserved.
//

#import "GXCircleImageViewAndLabel.h"

@interface GXCircleImageViewAndLabel ()

@end

@implementation GXCircleImageViewAndLabel

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews {
    UIImage *image = [UIImage imageNamed:@"icon-sign-image-sum"];
    self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, image.size.width * 3/2, image.size.height * 3/2)];
    self.imageView.image = image;
    [self addSubview:self.imageView];
//    [self.imageView setBackgroundColor:[UIColor redColor]];
    
    self.label = [[UILabel alloc] initWithFrame:CGRectMake(image.size.width * 3/4, 0, image.size.width * 2/3, image.size.height * 3 / 2)];
    [self addSubview:self.label];
    [self.label setFont:[UIFont fontWithName:@"Helvetica" size:13]];
    [self.label setTextAlignment:NSTextAlignmentCenter];
//    [self.label setBackgroundColor:[UIColor yellowColor]];
}

@end
